export const baseUrl = 'https://rtzzb.sxkj.fun'
export const openUrl = 'http://buildmanage.sxkj.fun:8081'
export const uploadUrl = 'https://rtzzb.sxkj.fun'
// export const uploadUrl = ''
// export const openUrl = ''
// export const baseUrl = ''
export const request = (url, method, data) => {
	return new Promise((r, j) => {
		uni.request({
			url: baseUrl + url,
			method,
			data
		}).then((res) => {
			r(res)
		}).catch(err => {
			j(err)
		})
	})
}

export const openRequest = (url, method, data) => {
	return new Promise((r, j) => {
		uni.request({
			url: openUrl + url,
			method,
			data
		}).then((res) => {
			console.log(res)
			r(res)
		}).catch(err => {
			j(err)
		})
	})
}